package com.zwxbc.funplay.dao;

import com.zwxbc.funplay.entity.Player;

import java.util.List;

public interface PlayerDao {
	/**
	 * 添加玩家
	 * @param player
	 */
	int addPlayer(Player player);

	Player playerLogin(Player player);

	/**
	 * 根据id获取玩家
	 * @param playerId
	 * @return
	 */
	Player getPlayerById(Long playerId);

	/**
	 * 列表玩家
	 * @return
	 */
	List<Player> getAllPlayers();

	/**
	 * 修改玩家信息
	 *
	 * @param player
	 * @return
	 */
	int updatePlayer(Player player);

	/**
	 * 修改玩家信息
	 * @param player
	 * @return
	 */

	int playerUpdate(Player player);

	/**
	 * 根据用户名获取玩家信息
	 * @param playerUsername
	 * @return
	 */
	Player getPlayerByUsername(String playerUsername);

	/**
	 * 删除玩家信息
	 *
	 * @param playerId
	 * @return
	 */
	int deletePlayer(Long playerId);

	/**
	 * 判断玩家是否存在
	 * @param username
	 * @param contact
	 * @param email
	 * @return
	 */
	boolean isPlayerExists(String username, String contact, String email);
}
